package com.neusoft.zqygbc.neusoft_wenda.service;


import com.neusoft.zqygbc.neusoft_wenda.javeBean.MyQuestionList;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.Question;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.QuestionEntity;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.QuestionList;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.Status;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;

public interface QuestionService {
    //获取问题列表
    @GET("Question/qlist")
    Call<QuestionList> getQuestionList(
            @Query("page") int page
    );
    //通过tid获取问题
    @GET("Question/tqlist")
    Call<QuestionList> getQuestionByTid(
            @Query("tid") String tid
    );
    //获取问题详情
    @GET("Question/qdetail")
    Call<Question> getQuestionDetail(
            @Query("qid") String qid
    );
    //发布问题
    @GET("Insert/addquestion")
    Call<Status> addquestion(
            @Query("uid") String uid,
            @Query("description") String description,
            @Query("tid") String tid,
            @Query("textcontent") String textcontent,
            @Query("filename[]") Map<String, RequestBody> maps
    );
    //获取用户所有问题
    @GET("Personal/myquestionlist")
    Call<MyQuestionList> myquestionlist(
            @Query("uid") String uid
    );
    //搜索问题
    @GET("Search/tempsearch")
    Call<List<QuestionEntity>> search(
            @Query("search") String search
    );


//注意服务器返回的事数组还是字符串！！！！！
/*

    @GET("getShopById.do")
    Call<QuestionList> getShopinfo(
            @Query("shop_id") String shop_id
    );
    //获取店铺列表
    @GET("getAllShops.do")
    Call<List<QuestionList>> getList();
    //获取美食列表
    @GET("getFoodByShop.do")
    Call<List<Food>> getFoodList(
            @Query("shop_id") String shop_id
    );
    //获取美食详情
    @GET("getFoodById.do")
    Call<Food> getFoodintroList(
            @Query("food_id") String food_id
    );
    //获取美食评论
    @GET("getAllUserFoodOrder.do")
    Call<List<Comments>> getFoodComments(
            @Query("food_id") String food_id
    );
    //下单
    @GET("insertOrder.do")
    Call<Orderinfo> insertOrder(
            @Query("user_id") String user_id,
            @Query("food_id") String food_id,
            @Query("num") String num,
            @Query("sum") String sum,
            @Query("suggesttime") String suggesttime
    );
*/



}
